<?php $this->load->view("common/header") ?>
<script type="text/javascript">
$(function() {
	//	$( "#job_start" ).datepicker({ dateFormat: 'yy-mm-dd' });
	});
</script>
<body>
  <div id="page_wrapper">
<?php $this->load->view("common/speel") ?>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td  align="left" valign="top"><?php $this->load->view("nav/main") ?></td>
      <td width="1265" valign="top">  
	  <div id="crum">
<?php echo $crum ?>
</div><br>
<form name="form1" method="post" action="<?php base_url()."client/search/" ?>">
  <table width="400" border="0" align="left" cellpadding="5" cellspacing="0">
    <tr>
      <td width="96" align="center" class="panelHeaderBgColor"><strong>Search </strong></td>
      <td width="222" align="left" bgcolor="#91A200" class="panelHeaderBgColor">
        <input name="search" type="text" id="search" size="50">
      </td>
      <td width="70" align="center"><input name="button" type="submit" class="tblBtn" id="button" value="Search"></td>
    </tr>
  </table>
</form>
<?php if(! empty($searchs) ) { ?>
  <br>
  <table width="100%" border="0" cellpadding="5" cellspacing="0" rules="groups">
    <tr class="tblHeader panelHeaderBgColor">
    <td align="left">Client name</td>
    <td align="left">Contacts</td>
    <td align="left">Phone</td>
    <td align="left">Email</td>
    <td align="left">Address</td>
    <td align="right">&nbsp;</td>
  </tr>
<?php foreach($searchs as $search) { ?>
  <tr class="tblBody">
    <td width="222" align="left"><?php echo $search['company_name'] ?></td>
    <td width="188" align="left"><?php echo $search['company_contact1'] ?><br>
      <?php echo $search['company_contact2'] ?></td>
    <td width="170" align="left"><?php echo $search['company_phone1'] ?><br>
      <?php echo $search['company_phone2'] ?></td>
    <td width="175" align="left"><?php echo $search['company_email'] ?></td>
    <td width="222" align="left">
	<?php 
	$address = array($search['company_address1']
				,$search['company_suburb']
				,$search['lu_lable']
				,$search['company_postcode']
				);
		
	echo format_client_address($address) ?>
    
    </td>
    <td width="83" align="right"><select class="client_action" name="client_action" id="client_action<?php echo $search['id'] ?>">
      <option value="0,<?php echo $search['id'] ?>">Action</option>
      <option value="1,<?php echo $search['id'] ?>">Edit Job</option>
      <option value="3,<?php echo $search['id'] ?>">Delete Job</option>
    </select>
      </td>
  </tr>


  <?php } ?>
</table>
<?php } ?>
  </td>
    </tr>
</table>

<?php $this->load->view("common/footer") ?>
</div>
</body>
</html>
